<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>for循环以及if综合使用</title>
</head>
<body>
    <div id="app">
        <ul>
            <li v-for="(ele,index) in arr" :key="index" v-if="index%2!==0">
                {{ele}}
            </li>
            <li v-else>
                你是偶数
            </li>
        </ul>
    </div>
    <script src="../node_modules/vue/dist/vue.js"></script>
    <script>
        let vue = new Vue({
            el:"#app",
            data:{
                arr:["赤","橙","黄","绿","青","蓝","紫"]
            }
        });
    </script>
</body>
</html>